package com.example.himalaya.view.activity;

import android.content.Intent;
import android.os.Bundle;

import com.example.himalaya.R;
import com.example.himalaya.base.BaseActivity;

import java.util.Timer;
import java.util.TimerTask;

public class WelcomeActivity extends BaseActivity {

    // Constant
    private final Integer JUMP_TIME = 1500;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);


        init();
    }

    private void init() {
        Timer timer = new Timer();

        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                Intent intent = new Intent(WelcomeActivity.this, MainActivity.class);


                // 跳转到主界面， 结束当前活动
                startActivity(intent);

                finish();
            }
        }, JUMP_TIME);
    }
}
